import request from '@/utils/request';

export function getMenuById(id) {
    return request({
        url: `sys/menu/${id}`,
        method: 'get'
    });
}
export function saveMenu(data) {
    return request({
        url: `sys/menu/save`,
        data,
        method: 'post'
    });
}
export function deleteMenu(data) {
    return request({
        url: `sys/menu/delete`,
        data,
        method: 'post'
    });
}
export function treeList() {
    return request({
        url: `sys/menu/treeList`,
        method: 'get'
    });
}
export function treeListNoButtons() {
    return request({
        url: `sys/menu/treeListNoButtons`,
        method: 'get'
    });
}
export function getMenuIds(id) {
    return request({
        url: `sys/role/getMenuIds/${id}`,
        method: 'get'
    });
}